package Demo2;

import java.util.ArrayList;
import java.util.Collection;

public class Test1 {
    public static void main(String[] args) {
        Collection<Movie> c = new ArrayList<>();
       c.add(new Movie("肖申克的救赎",9.7,"罗宾斯"));
        c.add(new Movie("《霸王别姬》", 9.6, "张国荣、张丰毅"));
        c.add(new Movie("《阿甘正传》", 9.5, "汤姆汉克斯"));

        for (Movie movie : c) {
            System.out.println(movie);
        }

    }
}
